﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>转换字符串的大小写</title>
</head>
<body>
    <p>该方法返回一个新的字符串，源字符串没有被改变。</p>
    <script>
        let txt = "Hello World!";
        document.write("<p>" + "原字符串：" + txt + "</p>");
        document.write("<p>" + "全部大写：" + txt.toUpperCase() + "</p>");
        document.write("<p>" + "全部小写：" + txt.toLowerCase() + "</p>");
    </script>
</body>
</html>
